{if $acao == "adicionar" || $acao == "editar"}
			<!-- Modal Local -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="modalLocal">{if $acao == "adicionar"}Adicionar{else}Editar{/if} Local</h4>
			</div>
			<form id="{if $acao == "adicionar"}adicionar{else}editar{/if}Local" class="form-horizontal" role="form" method="post" action="">
				<div class="modal-body">
					<div class="progressBar">
						<img src="images/spin.gif" width="32" height="32" />
					</div>	
					<div class="form-group">		
						<label for="nome" class="col-sm-4 control-label">Nome</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="name" placeholder="Nome" />
  				 			</div>	
 					</div>
  					<div class="form-group">	 
	   					<label for="tipo" class="col-sm-4 control-label">Tipo</label>
	   					<div class="col-xs-5">
	     			 		<input type="text" class="form-control" id="type" placeholder="Tipo"{if $tipoUsuario == 3} disabled="disabled"{/if} />
	   				 	</div>
	   				</div>	 
		  			<div class="form-group">
		   				 <label for="info" class="col-sm-4 control-label">Informa&ccedil;&otilde;es</label>
		   				 <div class="col-xs-5">
		     			 	<input type="text" class="form-control" id="info" placeholder="Informa&ccedil;&otilde;es" />
		   				 </div>
		   			</div>
		   			<div class="form-group">
		   				 <label for="info" class="col-sm-4 control-label">Etiqueta NFC</label>
		   				 <div class="col-xs-5">
		     			 	<input type="text" class="form-control" id="idNfc" placeholder="Etiqueta NFC" />
		   				 </div>
		   			</div>
		   			<div class="form-group">	 
		   				 <label for="latitude" class="col-sm-4 control-label">Latitude</label>
		   				 <div class="col-xs-5">
		     			 	<input type="text" class="form-control" id="latitude" placeholder="Latitude"{if $tipoUsuario != 1} disabled="disabled"{/if} />
		   				 </div>   				    				 
					</div>						
					<div class="form-group">	 
		   				 <label for="longitude" class="col-sm-4 control-label">Longitude</label>
		   				 <div class="col-xs-5">
		     			 	<input type="text" class="form-control" id="longitude" placeholder="Longitude"{if $tipoUsuario != 1} disabled="disabled"{/if} />
		   				 </div>   				    				 
					</div>					
					<div class="form-group">	 
		   				 <label for="listaAmbientes" class="col-sm-4 control-label">Nome do Ambiente</label>
		   				 <div class="col-xs-5">
		     			 	<select class="form-control" id="environmentId"{if $tipoUsuario != 1} disabled="disabled"{/if}>...</select>
		   				 </div>   				    				 
					</div>						
					<div class="form-group">	 
		   				 <label for="listaAdmLocal" class="col-sm-4 control-label">Administrador do Local</label>
		   				 <div class="col-xs-5">
							<select class="form-control" id="placeAdmId"{if $tipoUsuario == 3} disabled="disabled"{/if}>...</select>			     			 	
		   				 </div>   				    				 
					</div>
					<div class="form-group">
						<div class="col-sm-offset-4 col-sm-8">
							<div class="checkbox">
				    			<label >
				      				<input type="checkbox" id="important" name="important"{if $tipoUsuario != 1} disabled="disabled"{/if}>&Eacute; importante?
				    			</label>
				  			</div>
						</div>
					</div>
				</div>						  				
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
					<button type="submit" class="btn btn-success">{if $acao == "adicionar"}Adicionar{else}Editar{/if}</button>
				</div>
			</form>
			
{elseif $acao == "remover"}
			<!-- Modal Remover Local -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="modalRemoverLocal">Remover Local</h4>
			</div>
			<form class="form-horizontal" role="form" method="post" action="">
				<div class="modal-body">
					<p>Você deseja realmente remover os locais selecionados?</p>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
					<button type="submit" class="btn btn-danger">Remover</button>
				</div>
			</form>					
{else}
{include file="FragmentoCabecalho.html"}
{include file="FragmentoConteudoCabecalho.html"}
{include file="FragmentoMenu.html"}

<div class="panel panel-default">
	<div class="panel-heading"><h3>Gerenciar Locais</h3></div>
		<div class="panel-body">
 			<div class="form-group">	
	{if $tipoUsuario == 1}			
				<button data-toggle="modal" data-target="#modalAdicionar" href="index.php?controle=manterlocal&acao=adicionar" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-plus"></span>
				</button>
	{/if}			
				<button data-toggle="modal" id="btnEditarLocal" data-target="#modalEditar" href="index.php?controle=manterlocal&acao=editar" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-edit"></span>
				</button>
	{if $tipoUsuario == 1}					
				<button data-toggle="modal" id="btnRemoverLocal" data-target="#modalRemover" href="index.php?controle=manterlocal&acao=remover" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-remove"></span>
				</button>	
	{/if}													
			</div>		
			<table class="table table-striped table-bordered" id="listaLocais">
				<thead>
					<tr>
						<td><strong>ID</strong></td>
						<td><strong>Nome</strong></td>
						<td width="25%"><strong>ID do Ambiente</strong></td>
						<td width="15%"><strong>Tipo</strong></td>
						<td width="20%"><strong>ID do Administrador</strong></td>
					</tr>
				</thead>
			</table>
		</div>
	</div>

	<!-- Modal Adicionar -->
	<div class="modal fade" id="modalAdicionar" tabindex="-1" role="dialog" aria-labelledby="modalLocal" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<!-- Modal Editar -->
	<div class="modal fade" id="modalEditar" tabindex="-1" role="dialog" aria-labelledby="modalLocal" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<!-- Modal Remover -->
	<div class="modal fade" id="modalRemover" tabindex="-1" role="dialog" aria-labelledby="modalRemoverLocal" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
{include file="FragmentoConteudoRodape.html"} 
{include file="FragmentoRodape.html"}
{/if}